Function generators



y 1962 w. L. MCDERMID ETAL 3,036,775

FUNCTION GENERATORS s Shets-Sheet 1 Filed Aug. 11, 1960 V SWMW mi E 0E K wmmm in N 3 6 m mwfiw. WAMTDLM I a 3 3 w m m m m g 8 v m N 3 MAHHE K? 2 n w $53125 c 0225: 5mm 2 T 8 E5 1 3 mo w f1 m K sin N 1H i o m a a a is E: m z :23 E w; \a 0 mg g o n N F w mo c 5 u o J NM 5 l w; M 5:58 25 3 m N 5 6 5E N m w Ni Q; EEw m a m m N w m m N; a? m w 2228 Z Q v m N w $502 :3 m

ATTORNEY May 29, 1962 w. MCDERMID ETAL 3,036,775

FUNCTION GENERATORS Filed Aug. 11, 1960 f(t+6) I f(t+a) /I FlG.3u

f(t+1) A f(t+s) 1 3 Sheets-Sheet 3 FiG.3b

O 1 2 3 4 5 6 7 8 ti 3,036,775 FUNCTION GENERATORS William L. McDermid, Peekskill, Harold E. Petersen,

Chappaqua, and Glenmore L. Shelton, Jr., Mahopac, N.Y., assignors to International Business Machines Corporation, New York, N.Y., a corporation of New York Filed Aug. 11, 1960, Ser. No. 48,897 Claims. (Cl. 235-165) This invention relates to function generators, and in particular, to autocorrelation function and cross-correlation function generators.

Autocorrelation of a function provides a measure of the similarity between a function and itself, shifted through various displacements, whereas cross-correlation of two functions provides a measure of the similarity between the functions.

Autocorrelation function and cross-correlation function generators are useful in many areas, as for example in the examination of signals taken in the collection of measurements on physical objects such as in the character recognition and seismographic exploration fields.

The correlation function generators previously known in the art have been confined to a single functional purpose; for example autocorrelation or cross-correlation.

What has been discovered is a simple and fast correlation generator adaptable for auto or cross-correlation purposes. The correlation generator of this invention reduces the time required for correlation to fewer serial operations by the use of a unique scheme of serial and parallel operation and the invention further permits autocorrelation function and cross-correlation function generation to be accomplished with a single apparatus making common use of a considerable part of the apparatus for both generators.

An object of this invention is to provide an apparatus for either autocorrelation function or cross-correlation function generation using the same structure.

Another object is to provide an apparatus for either autocorrelation function or cross-correlation function generation utilizing common electronic circuits.

A further object of this invention is to provide simple, high-speed, digital and analog autocorrelation function generators.

Another object is to provide simple, high-speed digital and analog cross-correlation function generators.

The foregoing and other objects, features and advantages of the invention will be apparent from the following more particular description of electronic embodiments of the invention, as illustrated in the accompanying drawings.

These objects are achieved by digital and analog embodiments using time-controlled comparison of the input with itself when autocorrelating, and time-controlled comparison of the two inputs when cross-correlating.

In the drawings:

FIG. 1 is a schematic diagram of a digital embodiment of an autocorrelation function and cross-correlation function generator.

FIG. 2 is a schematic diagram of an analog embodiment of an autocorrelation function and cross-correlation function generator.

FIGS. 3a and 3b are diagrams showing the operation of the embodiment of FIG. 2 when autocorrelating.

FIGS. 4a and 4b are diagrams showing the operation of the embodiment of FIG. 2 when cross-correlating.

The autocorrelation function of a function of time may be described as a measure of its correlation or its similarity with respect to itself over all time displacements. Let the following example be considered. If the input function is defined as f(t), its autocorrelation function f(t) is def( tfi( 'f( where t'=time displacement. For example: the autocorrelation sum of a discrete input function: f( t) =l011 equals 3 for t'=0 as order-by-order multiplication of the function with itself, not displaced, provides products 1, 0, 1 and 1 which are summed to obtain 3. For t'=1, indicating that the product of the function and the function displaced by one unit are to be taken, the products 0, 0, 0 and l are obtained, providing a sum of 1. Similarly, t'=2 and t'=3 provide a sum of l. The autocorrelation function is symmetric, providing the same sums for positive and negative (right and left) displacements. The following table indicates the autocorrelation function of the input function 1011.

j(t) 1 1 1 3 1 1 I 1 The cross-correlation function of two functions of time may be described as a measure of their similarity over all time displacements. An example of a cross-correlation function is as follows. If the two functions are defined as f(t) and g(t) then their cross-correlation function f(t) where t'=time displacement. For example: the cross- -correlation sum of discrete input functions: f(t)=1011, g(t)=1100 equals 1 for t'=0 as an order-by-order multiplication of the bits yields 1, 0, 0 and 0, which is summed into 1. For t'=1, indicating a displacement of g(t) one bit to the right, the products 0, O, 1 and 0 are obtained, again providing -a sum of 1. At t'=2, a sum of 2 is obtained; at t'=3, a sum of 1 is obtained. Any shifts beyond 3 provide all zero products. A shift of 1 provides a sum of 1; a shift of -2 a sum of 0; and a shift of 3, a sum of 0. The cross-correlation function for the ex: ample given may be written:

scribed with respect to a four-digit binary number. It will V Patented May 29, 1962 be apparent to one skilled in the art that the principles In the example shown, a four-digit word is autocorcould be extended to a greater number of digits in any related, requiring four, non-redundant and gates 12, 14, radix. The input binary word may representavariety of 16 and 18 and four non-redundant counters 36, 38, information, such as the result of discretely sampling a 40 and 42. To autocorrelate an it-digit number, n function. 5 and gates and counters are required. If and gate 18,

When autocorrelating, switches 2 are set to represent corresponding to the t'=0 output is considered as the the input word. The switches are closed to indicate a l first and gate; and gate 16, corresponding to the and opened to indicatea0. Inthe drawing, the switches z'=l output, is considered as the second and gate, are shown in the positions required to indicate the binary etc.; and time 1 represents the time the first digit is Word 1011. applied to the first and gate, then the digits of the num- A ring counter 4 provides an output on one lead at a ber are applied in sequence to the first and gate during time in sequence. This counter is initially reset to its 0 times 1 through n, to the second and gate during position by a reset pulse to the system, and is stepped one times 2 through n+1, etc.; to the i and gate position by each clock pulse applied to the system. The during times i through n+i-l. The digits of the numbers in the block of the counter refer to time, Where input number are also applied simultaneously to all and time 1 occurs between the application of the fourth and gates sequentially during times 1 through It. fifth clock pulses; time 2 occurs between the fifth and Since binary data is considered in this embodiment, sixth clock pulse; etc. Counter outputs a, b, and c and gates and binary counters are shown. Higher occur before time 1, and their function will be explained radix digital multipliers and accumulators are used with with respect to the cross-correlation function generator. higher radix data.

A time gate 6 is conditioned and the least- The discrete autocorrelation function of a discrete insignificant bit (2) of the input word is applied to the lowput function is thus generated by a group of summations est order input of a shift register 8. This register is iniof products of discrete portions of the function accordtially reset to 0000. The clock pulses are delayed oneing to the formula half unit of time by delay 10 and are applied to shift the data in the shift register one position at every half-time such as 1 /2, 2 /2," 3%, etc. At time 1 /2, the least-significant bit of the input word is shifted to the sec- Cross-correlation generation, being a measure of the end position f register g The 21 i f the input d similarity of tWo functions, requires two inputs. Two is applied to the lowest order of shift register at time "2." groups of Switches 2 and are set to indicate the At time both bits stored in the register are shifted. hers to be cross-correlated These numbers y p I a i il manner, h remainder of h i t d i sent discrete samplings of functions or any other data to placed in the register during times 3 and 4. The d t be non-correlated. In the drawings, switches 2 represent i h register i further hift d t times qt/ the binary word 1011 and switches 50 represent 1100. 51/ 61 d 71/ nfi1 tfim 8, h i t 5 A recycling shift register 52 is serially loaded with tains 0000? the word indicated by switches 50 through and gates A group f d gates 12-24 i connected t ri us 54. The 2 bit is applied to the register at the time the shift register 8 outputs through or gates 26, 28 and an g counter 4 has an Output from its Section; the 21 gate 30. A flip-flop 32 controls the operation of and bit at the time an output is present from its b section; gate 30, causing it to be conditioned when autocorrelating, 40 e 2 hit at the time an output is Presam from the under control of a switch 34 when placed at the auto"" Section; and e 23 at timfi This register has an i i n h inf m tio i T m 1 i di ate th data put from its highest order which is fed back to the lowest in shift register 8 and the inputs to and gates 12-24 Order and pp to gates 56 and d -i h operation of th i it, When cross-correlating, switch 34 is placed at cross Table 1 shift register 8 and gates Time resetting flip-flop 32 to provide a 1 output to condition and gates 56 and 58.

A cycle control flip-flop 60 is initially reset for a first cycle by the reset pulse applied to the system and is set. f( t7( ).f(t-|0) I a second cycle at time 5 by a signal from ring,

counter 4. During the first cycle and gate 56 is consmillarly the Sum m counter equals ditioned; during the second cycle and gate 58 is conwhich could be expressed as the f(l) term of the autocorditioned Thus during times through the Word relation function:

Each and gate 1224 output is summed in an associated counter 36 through 48. The final sum in counter 42 equals 2.2+2 .2 +2 .2 +2 .2 which could be ex- 60 pressed as the f(0) term of the autocorrelation function:

determined by switches 50 is applied sequentially, with f tf d-J the least-significant bit first, through and gate 56 and Counter 38 contains the autocorrelation sum for t'=2 P gate 26 to and gates m After and counter 3 the autocorrelation sum f time 4, the output of the shift register 52 1S repeated Counters 44, 46 and 48 contain the same data as counters every four intervals of time! at time the 163st g- 40, 38 and 36 respectively due to the symmetry of the nificant bit i pp through g 58 and autocorrelation function and are, hence, redundant for of gate 28 to and gate 20, 22, and 24; at time 6, purposes of autocorrelation. They will be shown to be the 2 bit is applied to and gates 20, 22 and 24; at time necessary for cross-correlation generation. 7, and 2 bit is applied, etc. As will be described below, the outputs of shift register 52' after time 7 are not used.

Shift register 8 operates as described with respect to autocorrelation generation, however, its first order out- 6 are sequentially applied to the first and gate in the first group during times 1 through n, to the second and gate in the first group during times 2 through n+1, to the i and gate of the first group during times i put is inhibited by and gate 30 because flip-flop 32 is 5 through n+il; and to the first and gate of the secreset when cross-correlating. ond group during times "2 through n+1, to the second The information in Table II indicates the data applied and gate of the second group during times 3 through to and gates 12 through 24 during the operation of the n+2, and to the j and gate of the second group circuit when cross-correlating. during times '+1 through n-l-j.

Table II and gates Time 12 14 16 1s 20 22 24 f6) M f0) 96) f0 90 f0) U0) I0 90) f0) .06) f0) 90) Each and gate 12 through 24 output is summed in an associated counter 36 through 48. The sums are complete after time 7 as after this time no and gates have two applied inputs. The final sum in counter 42 equals which could be expressed as the f(()) term of the crosscorrelation function:

Similarly, the final sum in counter =f( 'g( )+f( -g( )+f( 'g( which could be expressed as the f(1) term of the crosscorrelation function:

f( tf( )g( Counter 38 contains the cross-correlation sum for t=2; counter 36, the sum for t'=3; counter 44, the sum for t=l; counter 46, the sum for z"=-2; and counter 48, the sum for t=-3.

In the example shown, two four-digit numbers are cross-correlated requiring a group of four and gates 12, 14, 16 and 18 and four counters 36', 38, 40 and 42 for the first cycle of operation and a group of three and gates 20, 22 and 24 and three counters 44, 46 and 48 for the second cycle of operation. Generalizing, if n-digit numbers are to be cross-correlated, the first cycle of operation requires n and gates and counters, the second cycle of operation requires n1 and gates and counters, and the first cycle of operation occurs during times 1 through n and the second cycle of operation occurs during timesn+1 through Zn-l, If and gate 18, corresponding to the t'=0 output, is considered as the first and gate of the first group; and gate 16, corresponding to the t'=l; output, is considered as the second and gate of the first group; etc.; and and gate 20, corresponding to the t=1 output, is considered as the first and gate of the second group; and gate 22 corresponding to the t=-2 output, is considered as the second and gate of the second group, etc.; and time 1 represents the time that the first digit is applied to any and gate; then the digits of the number stored in the recycling shift register are sequentially applied to all of the first group of and gates during times 1 through n, and to all of the second group of and gates during times n-l- 1 through 2n-1 (one of the digits in the recycling shift register is not required in the second cycle of operation) and the digits in the non-cycling shift register Since binary data are considered in this embodiment, and gates and binary counters are shown. Higher radix digital multipliers and accumulators are used with highernadix data.

The discrete cross-correlation function of a discrete input function is thus generated by a group of summations of products of discrete portions of one input function multiplied by discrete portions of the second input function according to the formula:

The circuit in FIGURE #1 is thus shown to selectably generate either autocorrelation functions or cross-correlation functions in a simple digital apparatus at a high speed.

Referring next to FIGURE 2, there is shown a schematic diagram of an analog autocorrelation function and cross correlation function generation that accepts either analog or digital (in the form of a pulse train) input data and generator analog outputs indicative of discrete portions of the autoconrelation or crosstorrelation function.

When autocorrelating, a switch 64 sets flip-flop 66, providing a conditioning signal for and gate 68. The single input f(t) is applied to a tapped delay line 70 and through and gate 68 and or gate '72 to a delay 74, which delay is equal to or greater than the duration of the input f(t). For this explanation, f(t) is presumed to have a duration of four units of time and delay '74 is presumed to delay the input for four units of time, generating (t-l-4). The tapped delay line 79 is shown to provide eight outputs, each separated .by one unit of time. Although it should be noted that a greater number of taps separated by smaller time intervals would permit the generation of discrete output functions more closely approximating continuous functions, It is necessary that delay 74 equal or exceed the input function duration and that delay 70 equal or exceed the sum of delay 74 and the input function duration.

FIGURE 3a is a diagram showing the various signals present in the circuit of FIGURE 2 when autocorrelating a sawtooth waveshape. A group of eight analog multipliers (FIGURE 2) 76 continuously provide the products f(t+4) f(t+t) for t at discrete intervals from t'=l through t=8, which is identical to the products f0) new for t at discrete 'Values from 3 through 4. Use of the four unit delay 74 is necessary due to the impossibility of providing negative time delays from the tapped delay line 70. Since the autocorrelation function is symmetric, delay 74 could be bypassed and products f(t)-f(r+t') would be generated from t=l through t=3. In this case a multiplier 76 would require an f(t-IO) input to generate the unshifted (t=) output. The multipliers may be any of the well-known analog multipliers, such as found in FIGURE 82 of a book entitled Analog Computer Techniques, authored by Clarence L. Johnson, 1956 and published by McGraw Hill.

A group of integrators 78 sum their analog inputs to provide analog output indications of the autocorrelation function at circuits coupled points separated by unit time intervals. FIGURE 3b shows the resulting autocorrelation function.

When cross-correlating, switch 64 (FIGURE 2) causes flip-flop 66 to be reset, providing a conditioning signal for and gate 80, and inhibiting and gate 68. In this case, a second input g(t) is applied through and gate 80 and or gate 72 to delay 74 where g(t+4) is generated. The input f(t) is applied to the tapped delay 70. FIGURE 44 shows the waveform present at various points in the circuit when cross-correlating a sawtooth waveform and a rectangular waveform. Multipliers 76 and integrators 78 (FIGURE 2) generate discrete points of the cross-correlation function of the inputs. FIGURE 4b shows the resulting cross-correlation function.

High speed, simple electronic correlation function generators have been shown capable of selective autocorrelation function or cross-correlation function generation. Both autocorrelation functions and cross-correlation functions are discretely generated from either discrete or continuous input functions, using time-controlled comparison of the input with itself when autocorrelating and time-controlled comparison of the two inputs when crosscorrelating.

While the invention has been particularly shown and described with reference to preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention.

What is claimed is:

1. An apparatus for cross-correlating two functions sampled at n discrete points, where each sampled value is referred to as a digit of an lz-digit number comprising, in combination: a first group of n multipliers, a second group of 11-1 multipliers; means to sequentially apply the digits of the first number simultaneously to all of the first group of multipliers during times 1 through It and to sequentially apply the digits of the first number simultaneously to all of the second group of multipliers during times n+1 through 2n-1; digit transfer means sequentially applying the digits of the second number to the first of the first group of multipliers during times 1 through n, sequentially applying the digits of the second number to a second of the first group of multipliers during times 2. through n+1, sequentially applying the digits of the second number to a third of the first group of multipliers during times 3 through n+2, correspondingly sequentially applying the digits of the second number to each remaining multiplier i of the first group of multipliers during times i through n|i 1, sequentially applying the digits of the second number to the first of the second group of multipliers during times 2 through n+1, sequentially applying the digits of the second number to the second of the second group of multipliers during times 3 through n+2, and correspondingly applying the digits of the second number to each remaining multiplier j of the second group of multipliers during times j+1 through n+j; and 211-1 accumulators, each to sum the products developed by a multiplier of each group of multipliers, whereby the sums in the accumulators at time 2n-1 are indicative of the cross-correlation function of the input numbers.

2. An apparatus for generating the cross-correlation function of two-n-bit binary words, where each bit is either a 1 or a "0 comprising, in combination: a non cycling shift register having n orders and an output corresponding to the data in each order; a recycling shift register having n orders and an output corresponding to the data in the highest order, said recycling shift register originally containing one of the two binary words with the least significant bit in the highest order position, and the remaining bits of consecutively higher significance in the register positions of consecutively lower order; means to apply the bits of the other word in consecutive significance, starting with the least significant bit, to the lowest order of the non-cycling shift register; a first plurality of n coincidence means, each having two operative inputs during a first cycle of operation, one from an order of the non-cycling shift register and one from the highest order of the recycling shift register, to provide an indication when both inputs are 1, a second plurality of n1 coincidence means, each having two operative inputs during a second cycle of operation, one from one of the n1 highest orders of the non-cycling shift register and one from the highest order of the recycling shift register, to provide an indication when both inputs are 1; means to simultaneously shift the data in both shift registers; cycle control means in time-relation with the shifting means to inhibit the generation of outputs from the second plurality of coincidence means for a first cycle terminated after it operations of the first plurality of coincidence means, and to inhibit the generation of indications from the first plurality of coincidence means for a second cycle begun after 11 operations of the first plurality of coincidence means; and a plurality of 2nl counters, each having its input connected to the output of a coincidence means for accumulating the sum of coincidence indications of the corresponding coincidence means, whereby the sums in the counters after 2n1 shifts of the registers are indicative of the cross-correlation function of the input words.

3. An apparatus for autocorrelating an n-bit binary word, where each bit is either a l or a 0, comprising in combination: a non-cycling shift register having 11 orders and an output corresponding to the data in each order; means to apply the bits of the 11-bit Word in sequence fro-m the first bit to the nth bit, to the first order of the shift register; a plurality of coincidence means, each having a first and a second input, where each first input is responsive to an output from a different shift register order and where each second input is responsive to the output of the first order of the shift register, and each to provide an indication when both inputs are 1; means to shift the data in the shift register; a plurality of counters, each having its input connected to the output of a coincidence means for accumulating the sum of coincidence indications of the corresponding coincidence means, whereby the sums accumulated in the counters are indicative of the autocorrelation function of the input word.

4. A cross-correlation function and autocorrelation function generator for functions sampled at n discrete points, where each sampled value is referred to as a digit of n, n-digit numbers comprising, in combination: a first plurality of n multipliers; a second plurality of n1 multipliers; function control means for providing a first output when autocorrelating and a second output when crosscorrelating; means to sequentially apply the digits of the first number to a first multiplier of the first plurality of multipliers during times 1 through It, to sequentially apply the digits of the first number to a second multiplier of the first plurality of multipliers during times 2 through n+1, to sequentially apply the digits of the first number to a third multipler of the first plurality of multipliers during times 3 through n+2, and to correspondingly sequentially apply digits of the first number to each remaining multiplier i of the first plurality of multipliers during times i through n+i-l; means responsive to the function control means to sequentially apply the digits of the first number simultaneously to all of the first plurality of multipliers when autocorrelating; means responsive to the function control values to sequentially apply the digits of a second number simultaneously to all of the first plurality of multipliers when cross-correlating; means to sequentially apply the digits of the first number to the first of the second plurality of multipliers during times 2 through n+1, means to sequentially apply the digits to the first number to the second plurality of multipliers during 3 through n+2 and to correspondingly apply the digits of the first number to each remaining multiplier i of the second plurality of multipliers during times i+l through n+i; means responsive to the function control means to sequentially apply the dim'ts of the second number simultaneously to all of the second plurality of multipliers during time n1+1 through 2n1 when cross-correlating; and a plurality of 211-1 accumulators, each to sum the products developed by a multiplier of each plurality of multipliers, whereby the sums of the accumulators at time 2n+1 are indicative of the cross-correlation functions of the input numbers when cross-correlating and at time n and indicative of the autocorrelation function of the input number when autocorrelating.

5. An apparatus for autocorrelating an n-bit binary Word, where each bit is either a 1 or a 0, comprising in combination; a non-cycling shift register having n orders and an output corresponding to the data in each order; means to apply the bits of the n-bit word in sequence from the first bit to the nth bit, to the first order of the shift register; a plurality of coincidence means, each having a first and a second input, where each first input is responsive to an output from a different shift register order and where each second input is responsive to the input to the first order of the shift register, and each to provide an indication when both inputs are 1; means to shift the data in the shift register; a plurality of counters, each having its input connected to the output of a coincidence means for accumulating the sum of coincidence indications of the corresponding coincidence means, whereby the sums accumulated in the counters are indicative of the autocorrelation function of the input word.

References Cited in the file of this patent UNITED STATES PATENTS 2,794,965 Yost June 4, 1957 2,840,308 Van Horne June 24, 1958 2,908,761 Raisbeck Oct. 13, 1959 2,982,853 Price et a1 May 2, 1961 

